package com.ys.web.user.friends.controller;

import com.ys.utils.base.http.ResponseHandler;
import com.ys.web.user.friends.service.FriendsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author quxinjun
 * @version 1.0.0
 * @ClassName CacheHelperController.java
 * @Description TODO
 * @createTime 2022年02月07日 14:39:00
 */
@Slf4j
@RestController
@RequestMapping("/cache")
public class CacheHelperController {

    @Autowired
    private FriendsService friendsService;

    /**
     * 通过电话号码 刷新用户好友缓存信息
     *
     * @param phone
     * @return
     */
    @PostMapping("/refreshFriend")
    public String refreshFriend(String phone) {
//        friendsService.refreshFriend(phone);
        friendsService.refreshAll();
        return ResponseHandler.success();
    }




}
